public class GxExecutor
The GxExecutor is responsible of Javascript code execution in the HTMLView. It will also tries to debounce the scripts which are enqueued for execution and send them in patches at specific rate.
Modifier and Type | Field and Description |
---|---|
BBjNumber | PreferAsyncExecution! When true then the executor will try to executes the JavaScript in this BBjHtmlView and returns immediately without waiting for a return value from the client. Enabling this option might boost the performance of the grid. |
org.apache.commons.collections4.map.ListOrderedMap | Queue! A map of scripts which must be executed |
BBjNumber | Rate! The number of milliseconds before the executor tries to flush the enqueued scripts on the client |
BBjNumber | SuppressBuiDebouncing! When true then the executor will limit the rate at which executeScript gets invoked on the HTMLView. Setting this to "0" will help to boost up the communication performance between BBj and the grid which lives inside the HTMLView in BUI context By default this options is set to "0" |
BBjNumber | SuppressGuiDebouncing! When true then the executor will limit the rate at which executeScript gets invoked on the HTMLView. Setting this to "0" will help to boost up the communication performance between BBj and the grid which lives inside the HTMLView in GUI context By default this options is set to "1" |
BBjNumber | SuppressWebDebouncing! When true then the executor will limit the rate at which executeScript gets invoked on the HTMLView. Setting this to "0" will help to boost up the communication performance between BBj and the grid which lives inside the HTMLView in BUI & DWC context By default this options is set to "0" |
BBjGridExWidget | Widget! The widget instance |
Constructor and Description |
---|
GxExecutor(BBjGridExWidget widget!, BBjNumber rate!) Construct new GxExecutor object |
Modifier and Type | Method and Description |
---|---|
void | asyncExecute(BBjString script!) Executes the specified JavaScript in this BBjHtmlView control and returns immediately |
Object | execute(BBjString key!, BBjString script!, BBjNumber debounced!, BBjNumber priority!) Execute a Javascript code on the client |
Object | execute(BBjString script!, BBjNumber debounced!, BBjNumber priority!) Execute a Javascript code on the client and use the script itself as a key |
Object | execute(BBjString key!, BBjString script!, BBjNumber debounced!) Execute a Javascript code on the client with an auto calculated priority |
Object | execute(BBjString script!, BBjNumber debounced!) Execute a Javascript code on the client , use the script itself as a key and auto calculate priority |
Object | execute(BBjString key!, BBjString script!) Execute and debounce a Javascript code on the client and auto calculate priority |
Object | execute(BBjString script!) Execute and debounce a Javascript code on the client , use the script itself as a key and auto calculate priority |
GxExecutor | flush() Iterate over the enqueued scripts and execute them on the HTML View. The gird should call this method once when it is ready to kick in the execution process.
Normally this done after the The executor then will keep flushing itself whenever it is needed. |
BBjNumber | getSuppressBuiDebouncing() |
void | onFlush(BBjTimerEvent event!) A BBjTimerEvent listener which will be invoked when the executor count down reaches 0 to flush the enqueued scripts |
void | setSuppressBuiDebouncing(BBjNumber suppressBuiDebouncing!) |
public BBjNumber PreferAsyncExecution!
When true then the executor will try to executes the JavaScript in this BBjHtmlView and returns immediately without waiting for a return value from the client.
Enabling this option might boost the performance of the grid.
public org.apache.commons.collections4.map.ListOrderedMap Queue!
A map of scripts which must be executed
public BBjNumber Rate!
The number of milliseconds before the executor tries to flush the enqueued scripts on the client
public BBjNumber SuppressBuiDebouncing!
When true then the executor will limit the rate at which executeScript gets invoked on the HTMLView.
Setting this to "0" will help to boost up the communication performance between BBj and the grid which lives inside the HTMLView in BUI context
By default this options is set to "0"
This option is no longer used and will be removed in the future. Use `SuppressWebDebouncing` instead.
public BBjNumber SuppressGuiDebouncing!
When true then the executor will limit the rate at which executeScript gets invoked on the HTMLView.
Setting this to "0" will help to boost up the communication performance between BBj and the grid which lives inside the HTMLView in GUI context
By default this options is set to "1"
public BBjNumber SuppressWebDebouncing!
When true then the executor will limit the rate at which executeScript gets invoked on the HTMLView.
Setting this to "0" will help to boost up the communication performance between BBj and the grid which lives inside the HTMLView in BUI & DWC context
By default this options is set to "0"
public BBjGridExWidget Widget!
The widget instance
public GxExecutor(BBjGridExWidget widget!, BBjNumber rate!)
Construct new GxExecutor object
BBjGridExWidget
widget! the widget instanceBBjNumber
rate! The number of milliseconds before the GxExecutor tries to flush the called scripts on the clientpublic void asyncExecute(BBjString script!)
Executes the specified JavaScript in this BBjHtmlView control and returns immediately
BBjString
script! The Javascript codepublic Object execute(BBjString key!, BBjString script!, BBjNumber debounced!, BBjNumber priority!)
Execute a Javascript code on the client
BBjString
key! the script unique idBBjString
script! The Javascript codeBBjNumber
debounced! When true , then the script should be debounced , sent directly to the HTMLView otherwiseBBjNumber
priority! The script prioritypublic Object execute(BBjString script!, BBjNumber debounced!, BBjNumber priority!)
Execute a Javascript code on the client and use the script itself as a key
BBjString
script! The Javascript codeBBjNumber
debounced! When true , then the script should be debounced , sent directly to the HTMLView otherwiseBBjNumber
priority! The script prioritypublic Object execute(BBjString key!, BBjString script!, BBjNumber debounced!)
Execute a Javascript code on the client with an auto calculated priority
BBjString
script! The Javascript codeBBjNumber
debounced! When true , then the script should be debounced , sent directly to the HTMLView otherwiseBBjNumber
priority! The script prioritypublic Object execute(BBjString script!, BBjNumber debounced!)
Execute a Javascript code on the client , use the script itself as a key and auto calculate priority
BBjString
script! The Javascript codeBBjNumber
debounced! When true , then the script should be debounced , sent directly to the HTMLView otherwisepublic Object execute(BBjString key!, BBjString script!)
Execute and debounce a Javascript code on the client and auto calculate priority
BBjString
key! the script unique idBBjString
script! The Javascript codepublic Object execute(BBjString script!)
Execute and debounce a Javascript code on the client , use the script itself as a key and auto calculate priority
BBjString
key! the script unique idpublic GxExecutor flush()
Iterate over the enqueued scripts and execute them on the HTML View.
The gird should call this method once when it is ready to kick in the execution process.
Normally this done after the ON_PAGE_LOADED
event is fired.
The executor then will keep flushing itself whenever it is needed.
public BBjNumber getSuppressBuiDebouncing()
Use `getSuppressWebDebouncing` instead
public void onFlush(BBjTimerEvent event!)
A BBjTimerEvent listener which will be invoked when the executor count down reaches 0 to flush the enqueued scripts
BBjTimerEvent
event!public void setSuppressBuiDebouncing(BBjNumber suppressBuiDebouncing!)
Use `setSuppressWebDebouncing` instead